﻿using Microsoft.Xna.Framework;

namespace FlipRunner
{
    public static class RectangleBuilder
    {
         public static Rectangle FromCenter(Point center, int width, int height)
         {
             return new Rectangle(center.X - width/2, center.Y - height/2, width, height);
         }

         public static Rectangle FromBottomRight(Point bottomRight, int width, int height)
         {
             return new Rectangle(bottomRight.X - width, bottomRight.Y - height, width, height);
         }

         public static Rectangle FromTopLeft(Point topLeft, int width, int height)
         {
             return new Rectangle(topLeft.X, topLeft.Y, width, height);
         }
    }
}